﻿//
// Created: 2018/8/22
// Author: chenqiang
//
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using Model.Util;

namespace Model.Util.Map
{
    internal  class UploadFileMap:EntityTypeConfiguration< UploadFile >    
    {
        public UploadFileMap()
        {
             this.ToTable("UploadFile");
             this.HasKey(i => new { i.FileId });
             this.Property(i => i.FileId).HasColumnName("FileId");                     
             this.Property(i => i.FileName).HasColumnName("FileName");                     
             this.Property(i => i.FileSize).HasColumnName("FileSize");                     
             this.Property(i => i.ServiceAddress).HasColumnName("ServiceAddress");                     
             this.Property(i => i.Path).HasColumnName("Path");                     
             this.Property(i => i.Site).HasColumnName("Site");                     
             this.Property(i => i.FileExt).HasColumnName("FileExt");                     
             this.Property(i => i.CreateTime).HasColumnName("CreateTime");                     
             this.Property(i => i.ProjectId).HasColumnName("ProjectId");                     
             this.Property(i => i.Creator).HasColumnName("Creator");
             this.Property(i => i.Spec).HasColumnName("Spec");
             this.Property(i => i.Spec1).HasColumnName("Spec1");
             this.Property(i => i.Spec2).HasColumnName("Spec2");
             this.Property(i => i.Spec3).HasColumnName("Spec3");
             this.Property(i => i.LocalFullPath).HasColumnName("LocalFullPath");
            
        }   
    }
    
     public static class UploadFileMapExtensions
    {
        public static void UserUploadFileMap(this DbModelBuilder pModelBuilder)
        {
            pModelBuilder.Configurations.Add(new UploadFileMap());
        }
    }
}